package wanbang.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import wanbang.service.AddMoneyService;

@Controller
public class AddMoneyController {
	@Autowired
	private AddMoneyService addMoneyService;
	@ResponseBody
	@RequestMapping("/addMoney")
	public boolean addUerMoney(Double money,Integer userId) {
		return this.addMoneyService.insertIntoUserBalance(money, userId);
	}
	@ResponseBody
	@RequestMapping("/selectMoney")
	public Double selectMoney(Integer userId) {
		return this.addMoneyService.selectUserBlanceByUserId(userId);
	}
}
